package test.Schedule;


import com.why.simpleboot.core.annotation.ioc.Component;
import com.why.simpleboot.core.annotation.schedule.Scheduled;

/**
 * @author wanghongyang24
 */
@Component
public class ScheduleDemoService {



    @Scheduled(fixedRate = 5000)
    public void sayHelloEvery5Seconds(){
        System.out.println("hello, this is a interval schedule task!");
    }

    @Scheduled(initialDelay = 10000)
    public void sayHelloEveryAfter10Seconds()
    {
        System.out.println("hello, this is a timeout schedule task!");
    }
}
